<template>
     <ul class="todo-main">
        <Item :deleteOneTodo="deleteOneTodo" v-for="(todo,index) in todoList" :todo="todo" :key="todo.id" :index="index" :updateOneChecked="updateOneChecked"></Item>
      </ul>
</template>
<script lang="ts">
import { defineComponent } from 'vue';
export default defineComponent({
name:'Main'
})
</script>
<script lang="ts" setup>
import type { TodoData } from "@/App.vue";
import Item from "@/components/Item/index.vue"
const props = defineProps<{
  todoList:TodoData[],
  updateOneChecked(index:number):void,
  deleteOneTodo:(index:number)=>void
}>()

</script>

<style lang="less" scoped>
/*main*/
.todo-main {
  margin-left: 0px;
  border: 1px solid #ddd;
  border-radius: 2px;
  padding: 0px;
}

.todo-empty {
  height: 40px;
  line-height: 40px;
  border: 1px solid #ddd;
  border-radius: 2px;
  padding-left: 5px;
  margin-top: 10px;
}
</style>